package com.eastfair.auth.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 用户修改密码
 * Created by wugaoping on 2019/8/18.
 */

@Data
public class UserUpdPassParam {
    //校验标识
    public interface UpdPassword {}
    public interface InitUserPassword {}

    @ApiModelProperty(value = "用户id", required = true)
    @NotNull(message = "用户id不能为空")
    private Long id;

    @ApiModelProperty(value = "旧密码", required = true)
    @NotBlank(groups = {UpdPassword.class},message = "旧密码不能为空")
    private String oldPassword;

    @ApiModelProperty(value = "新密码", required = true)
    @NotBlank(groups = {UpdPassword.class, InitUserPassword.class},message = "新密码不能为空")
    private String newPassword;

    private String code;

    private String mobile;

    /**
     * 公钥
     */
    @ApiModelProperty(value = "公钥")
    private String publicKey;

    /**
     * 验证码id
     */
    @ApiModelProperty(value = "验证码id")
    private String verifyId;

    /**
     * 验证码值
     */
    @ApiModelProperty(value = "验证码值")
    private String verifyValue;

}
